package org.box.metadata.cli.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.box.metadata.cli.impl.CommandCompatible;
import org.box.metadata.shell.CommandHandler;

/**
 * Marks a field as a command in the command line.
 * 
 * @see Option
 * @see Argument
 * @see CommandCompatible
 * 
 * @author <a href="mailto:alexander.box@gmail.com">Alexander Korobka</a>
 * 
 */
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface Command {

	/**
	 * A word(s) that uses in the shell's prompt line to execute the application.
	 * 
	 * The space or tab charters can be used inside like: "create db".
	 * 
	 * @return a simple name of the application.
	 */
	String fullName();

	/**
	 * A one\few chars that uses in the shell's prompt line to execute the application.
	 * 
	 * NO space or tab charters can be used inside.
	 * 
	 * @return a char key of the application.
	 */
	String shortName() default "";

	/**
	 * A brief description of the application
	 * 
	 * @return a string
	 */
	String description();
	
	Class<? extends CommandHandler<?>>[] handlers() default{};
	
}
